package org.robot.scm.pojos.config.base;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author : Awn create on 2025/5/19 15:47
 */

@Slf4j
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseSchedule {

    private String jobName;
    private String jobCron;
    private Integer jobBatches;
    private String noticeSrc;

    public Integer hour() {
        String[] split = jobCron.split(":");
        return Integer.parseInt(split[0]);
    }

    public Integer minute() {
        String[] split = jobCron.split(":");
        return Integer.parseInt(split[1]);
    }
}
